//package org.hgvc.webapp.ets.spring.service;
//
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//
//import org.hgvc.webapp.ets.bo.ActionBulletin;
//import org.hgvc.webapp.ets.bo.Agent;
//import org.hgvc.webapp.ets.bo.Agreement;
//import org.hgvc.webapp.ets.bo.CalendarDtl;
//import org.hgvc.webapp.ets.bo.ComplimentaryBooking;
//import org.hgvc.webapp.ets.bo.Member;
//import org.hgvc.webapp.ets.bo.MemberBooking;
//import org.hgvc.webapp.ets.bo.MemberPointEntitle;
//import org.hgvc.webapp.ets.bo.Package;
//import org.hgvc.webapp.ets.bo.PackagePeakRates;
//import org.hgvc.webapp.ets.bo.RCIBooking;
//import org.hgvc.webapp.ets.bo.RCIBookingDetail;
//import org.hgvc.webapp.ets.bo.VoucherEntryDetail;
//import org.hgvc.webapp.ets.constant.ActionBulletinConstant;
//import org.hgvc.webapp.ets.constant.AdminConstant;
//import org.hgvc.webapp.ets.constant.BookingConstant;
//import org.hgvc.webapp.ets.constant.CommonConstant;
//import org.hgvc.webapp.ets.constant.MemberConstant;
//import org.hgvc.webapp.ets.constant.PartnerConstant;
//import org.hgvc.webapp.ets.constant.SystemConstant;
//import org.hgvc.webapp.ets.jsf.beans.admin.AdminMemberBookingBean;
//import org.hgvc.webapp.ets.spring.dao.BookingHbmDao;
//import org.hgvc.webapp.ets.spring.dao.PackageHbmDao;
//import org.hgvc.webapp.ets.spring.dao.PartnerHbmDao;
//import org.jocsb.base.exception.BaseException;
//import org.jocsb.base.util.DateUtil;
//import org.jocsb.base.util.SpringUtils;
//import org.jocsb.base.util.SystemUtil;
//
//
//public class CopyOfBookingServiceImpl implements BookingService{
//	private BookingHbmDao dao;
//	private PackageHbmDao packageDao;
//	private PartnerHbmDao partnerDao;
//	private AdminService adminService;
//	private MemberService memberService;
//	private SystemService systemService;
//	private String normalPeakType;
//	private String superPeakType;
//	
//	
//	
//	public void setSystemService(SystemService systemService) {
//		this.systemService = systemService;
//	}
//	public void setNormalPeakType(String normalPeakType) {
//		this.normalPeakType = normalPeakType;
//	}
//	public void setSuperPeakType(String superPeakType) {
//		this.superPeakType = superPeakType;
//	}
//	public void setPackageDao(PackageHbmDao packageDao) {
//		this.packageDao = packageDao;
//	}
//	public void setPartnerDao(PartnerHbmDao partnerDao) {
//		this.partnerDao = partnerDao;
//	}
//	public void setDao(BookingHbmDao dao) {
//		this.dao = dao;
//	}
//	public void setAdminService(AdminService adminService) {
//		this.adminService = adminService;
//	}
//	public void setMemberService(MemberService memberService) {
//		this.memberService = memberService;
//	}
//	
//	public List<ComplimentaryBooking> getComplimentaryBookingList()throws BaseException{
//		List<ComplimentaryBooking> list=new ArrayList<ComplimentaryBooking>();
//		try{
//			list=dao.getComplimentaryBookingList();
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{ComplimentaryBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<ComplimentaryBooking> getComplimentaryBookingList(String searchField,String searchKeyword)throws BaseException{
//		List<ComplimentaryBooking> list=new ArrayList<ComplimentaryBooking>();
//		try{
//			list=dao.getComplimentaryBookingList(searchField,searchKeyword);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{ComplimentaryBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public void saveComplimentaryBooking(ComplimentaryBooking complimentaryBooking)throws BaseException{
//		try{
//			String bookingNo=adminService.getDocumentNo(CommonConstant.DOC_TYPE_COMPLIMENTARY_BOOKING);
//			VoucherEntryDetail voucherEntryDetail = (VoucherEntryDetail)dao.getObject(VoucherEntryDetail.class, complimentaryBooking.getVoucherEntryDetail().getVoucherEntryDetailId());
//			complimentaryBooking.setVoucherEntryDetail(voucherEntryDetail);
//			complimentaryBooking.setBookingNo(bookingNo);
//			complimentaryBooking.setBookingDate(new Date());
//			///complimentaryBooking.setStatus(BookingConstant.STATUS_PENDING);
//			
//			if (complimentaryBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_CONFIRM)){
//				voucherEntryDetail.setComplimentaryBookingNo(bookingNo);
//				voucherEntryDetail.setModifiedBy(complimentaryBooking.getCreatedBy());
//				voucherEntryDetail.setModifiedDate(new Date());
//				dao.update(voucherEntryDetail);
//			}
//			dao.save(complimentaryBooking);
//		}catch(BaseException be){
//			throw be;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.save.object", new Object[]{ComplimentaryBooking.class.getSimpleName()}));
//		}
//	}
//	
//	public void updateComplimentaryBooking(ComplimentaryBooking complimentaryBooking)throws BaseException{
//		try{
//			if (complimentaryBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_CONFIRM)){
//				VoucherEntryDetail voucherEntryDetail = (VoucherEntryDetail)dao.getObject(VoucherEntryDetail.class, complimentaryBooking.getVoucherEntryDetail().getVoucherEntryDetailId());
//				voucherEntryDetail.setComplimentaryBookingNo(complimentaryBooking.getBookingNo());
//				voucherEntryDetail.setModifiedBy(complimentaryBooking.getModifiedBy());
//				voucherEntryDetail.setModifiedDate(new Date());
//				dao.update(voucherEntryDetail);
//			}
//			dao.update(complimentaryBooking);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.update.object", new Object[]{ComplimentaryBooking.class.getSimpleName()}));
//		}
//	}
//	
//	public void saveRCIBooking(RCIBooking rciBooking)throws BaseException{
//		try{
//			String bookingNo=adminService.getDocumentNo(CommonConstant.DOC_TYPE_RCI_BOOKING);
//			
//			rciBooking.setRciBookingNo(bookingNo);
//			rciBooking.setRciBookingDate(new Date());
//			//rciBooking.setStatus(BookingConstant.STATUS_PENDING);
//			dao.save(rciBooking);
//		}catch(BaseException be){
//			throw be;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.save.object", new Object[]{RCIBooking.class.getSimpleName()}));
//		}
//	}
//	
//	public void updateRCIBooking(RCIBooking rciBooking)throws BaseException{
//		try{
//			dao.update(rciBooking);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.update.object", new Object[]{RCIBooking.class.getSimpleName()}));
//		}
//	}
//	
//	public void saveRCIBookingDetail(RCIBookingDetail rciBookingDetail)throws BaseException{
//		try{
//			dao.save(rciBookingDetail);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.save.object", new Object[]{RCIBookingDetail.class.getSimpleName()}));
//		}
//	}
//	
//	public void updateRCIBookingDetail(RCIBookingDetail rciBookingDetail)throws BaseException{
//		try{
//			dao.update(rciBookingDetail);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.update.object", new Object[]{RCIBookingDetail.class.getSimpleName()}));
//		}
//	}
//	
//	public void deleteRCIBookingDetail(List<RCIBookingDetail> deleteList)throws BaseException{
//		try{
//			for (RCIBookingDetail rciBookingDetail : deleteList){
//				if (rciBookingDetail.isMarkAsSelect()){
//					rciBookingDetail.setIsDeleted(CommonConstant.IS_DELETED);
//					dao.update(rciBookingDetail);
//				}
//			}
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.delete.object", new Object[]{RCIBookingDetail.class.getSimpleName()}));
//		}
//	}
//	
//	public List<RCIBooking> getRCIBookingList()throws BaseException{
//		List<RCIBooking> list=new ArrayList<RCIBooking>();
//		try{
//			list=dao.getRCIBookingList();
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{RCIBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<RCIBookingDetail> getRCIBookingDetailList(RCIBooking rciBooking)throws BaseException{
//		List<RCIBookingDetail> list=new ArrayList<RCIBookingDetail>();
//		try{
//			list=dao.getRCIBookingDetailList(rciBooking);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{RCIBookingDetail.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	
//	public List<MemberBooking> getMemberBookingList(String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList(bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<MemberBooking> getMemberBookingList(Agent agent, String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList(agent,bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<MemberBooking> getMemberBookingList(Member member, String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList( member  ,bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<MemberBooking> getMemberBookingList(String searchField,String searchKeyword,String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList(searchField,searchKeyword,bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<MemberBooking> getMemberBookingList(Agent agent,String searchField,String searchKeyword,String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList(agent, searchField,searchKeyword,bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public List<MemberBooking> getMemberBookingList(Member member,String searchField,String searchKeyword,String bookingStatus)throws BaseException{
//		List<MemberBooking> list = new ArrayList<MemberBooking>();
//		try{
//			list=dao.getMemberBookingList(member, searchField,searchKeyword,bookingStatus);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.list.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//		return list;
//	}
//	
//	public void saveMemberBooking(MemberBooking memberBooking)throws BaseException{
//		try{
//
//			
//			String bookingNo=adminService.getDocumentNo(CommonConstant.DOC_TYPE_MEMBER_BOOKING);
//			memberBooking.setMemberBookingNo(bookingNo);
//			memberBooking.setMemberBookingDate(new Date());
//			if (memberBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_CONFIRM)){
//				this.memberService.deductMemberPoint(memberBooking.getAgreement().getAgreementId(), memberBooking.getBookingPoint());
//			}
//			Package bookingPackage=(Package) dao.getObject(Package.class, memberBooking.getBookingPackage().getPackageId());
//			Integer pointToDeduct=0;
//			String checkDay = DateUtil.getDayName(memberBooking.getCheckInDate());
//			if (checkDay.equalsIgnoreCase(DateUtil.DAY_FRI)||checkDay.equalsIgnoreCase(DateUtil.DAY_SAT)){//Detect as Weekend (FRI,SAT)
//				pointToDeduct = bookingPackage.getWeekendPoint();
//			}else{//Weekday(SUN,MON,TUE,WED,THU)
//				pointToDeduct = bookingPackage.getWeekdayPoint();
//			}
//			memberBooking.setBookingPoint(pointToDeduct);
//			memberBooking.setBookingPrice(0.0);
//			dao.save(memberBooking);
//			
//			this.memberService.validateMemberPoint(memberBooking.getAgreement().getAgreementId(), memberBooking.getBookingPoint());
//			
//			if (memberBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_PENDING)){
//				this.memberService.reserveMemberPoint(memberBooking.getAgreement().getAgreementId(), memberBooking.getBookingPoint());
//			}
//			
//			//Insert ActionBulletin
//			ActionBulletin ab = new ActionBulletin();
//			ab.setActionBean(AdminMemberBookingBean.BEAN_NAME);
//			ab.setActionMethod(AdminMemberBookingBean.AB_ACTION_INVOKE);
//			ab.setActionCode(SpringUtils.getMessage("ab.new.member.booking.pending.approval", new Object[]{bookingNo}));
//			ab.setActionParam1(memberBooking.getMemberBookingId());
//			ab.setCreatedBy(SystemConstant.SYSTEM_USER);
//			ab.setCreatedDate(new Date());
//			ab.setIsDeleted(CommonConstant.NOT_DELETED);
//			ab.setType(ActionBulletinConstant.AB_ACTION_TYPE);
//			ab.setActionNo(SystemUtil.getUniqueCode());
//			systemService.createActionBulletinByUser(ab, bookingPackage.getPartner().getRefUser());
//			
//			//Added by Jacky 21-Dec-2008 1201
//			String newBookingTransactionDesc = SpringUtils.getMessage(MemberConstant.TRANS_NEW_BOOKING, new Object[]{bookingNo,memberBooking.getStatus()});
//			memberService.insertMemberTransaction(memberBooking.getAgreement().getAgreementId(), newBookingTransactionDesc);
//		}catch(BaseException be){
//			throw be;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.save.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//	}
//	
//	public void updateMemberBooking(MemberBooking memberBooking)throws BaseException{
//		try{
//			Integer nonPeakPoint=0;
//			Double nonPeakPrice=0.0;
//			String pointCateId="";
//			String checkDay = DateUtil.getDayName(memberBooking.getCheckInDate());
//			if (checkDay.equalsIgnoreCase(DateUtil.DAY_FRI)||checkDay.equalsIgnoreCase(DateUtil.DAY_SAT)){//Detect as Weekend (FRI,SAT)
//				nonPeakPoint = memberBooking.getBookingPackage().getWeekendPoint();
//				nonPeakPrice = memberBooking.getBookingPackage().getWeekendPrice();
//				pointCateId = memberBooking.getBookingPackage().getWePointCate().getPointCatId();
//			}else{//Weekday(SUN,MON,TUE,WED,THU)
//				nonPeakPoint = memberBooking.getBookingPackage().getWeekdayPoint();
//				nonPeakPrice = memberBooking.getBookingPackage().getWeekdayPrice();
//				pointCateId = memberBooking.getBookingPackage().getWdPointCate().getPointCatId();
//			}
//			
//			if (memberBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_CANCEL)){
//				//Rollback Member Point
//				//---Modified by Jacky 26-Nov-2008 1912-------
//				//reverseMemberPointDeduction(memberBooking.getAgreement(),memberBooking.getBookingPoint(),pointCateId);
//				this.memberService.cancelMemberPoint(memberBooking.getAgreement().getAgreementId(), memberBooking.getBookingPoint());
//				
//			}else{
//				if (memberBooking.getStatus().equalsIgnoreCase(BookingConstant.STATUS_CONFIRM)){
//					//Deduct Member Point
//					Integer pointToDeduct=0;
//					//Check Normal or Super Peak Rates
//					pointToDeduct = getPeakPoints(memberBooking, nonPeakPoint);
//					memberBooking.setBookingPoint(pointToDeduct);
//					//---Modified by Jacky 26-Nov-2008 1912-------
//					//memberPointToDeduct(memberBooking.getAgreement(),memberBooking,pointToDeduct,pointCateId,nonPeakPrice);
//					this.memberService.deductMemberPoint(memberBooking.getAgreement().getAgreementId(), pointToDeduct);
//				}
//			}
//			dao.update(memberBooking);
//			//Added by Jacky 21-Dec-2008 1201
//			String newBookingTransactionDesc = SpringUtils.getMessage(MemberConstant.TRANS_BOOKING, new Object[]{memberBooking.getMemberBookingNo(),memberBooking.getStatus()});
//			memberService.insertMemberTransaction(memberBooking.getAgreement().getAgreementId(), newBookingTransactionDesc);
//		}catch(BaseException be){
//			throw be;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.update.object", new Object[]{MemberBooking.class.getSimpleName()}));
//		}
//	}
//	
//	private void memberPointToDeduct(Agreement agreement,MemberBooking memberBooking,Integer pointToDeduct,String pointCatId,Double nonPeakPrice)throws BaseException{
//		try{
//			List<MemberPointEntitle> memberPointEntitleList=this.memberService.getMemberPointEntitleList( agreement.getAgreementId(),pointCatId);
//			
//			if(memberPointEntitleList.size()==0)
//				throw new BaseException(SpringUtils.getMessage("error.member.entitlement.not.found",new Object[]{}));	
//			
//			MemberPointEntitle memberPointEntitle=null;
//			memberPointEntitle = memberPointEntitleList.get(0);
//			
//			Integer availablePoint=memberPointEntitle.getPoint();
//			
//			if (pointToDeduct<=0)
//				throw new BaseException(SpringUtils.getMessage("error.package.deduct.point.not.found",new Object[]{}));
//			
//			if (availablePoint<pointToDeduct){
//				if (memberBooking.getBookingPackage().getChargeType().equalsIgnoreCase(AdminConstant.CHARGE_POINT))
//					throw new BaseException(SpringUtils.getMessage("error.member.insufficient.point",new Object[]{}));
//				else{
//					Integer inSufficentPoint = pointToDeduct - availablePoint;
//					Double currentPrice = getPeakPrice(memberBooking, nonPeakPrice);
//					Double newChargesPrice = (inSufficentPoint.doubleValue()/pointToDeduct.doubleValue())*currentPrice;
//					memberBooking.setBookingPrice(newChargesPrice);
//				}
//			}
//			//Update Member Point
//			memberPointEntitle.setPoint(memberPointEntitle.getPoint()-pointToDeduct);
//			memberPointEntitle.setModifiedDate(new Date());
//			dao.update(memberPointEntitle);
//		}catch(BaseException be){
//				throw be;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.update.object", new Object[]{MemberPointEntitle.class.getSimpleName()}));
//		}
//	}
//	
//	private void reverseMemberPointDeduction(Agreement agreement,Integer bookingPoint,String pointCatId)throws BaseException{
//		try{
//			List<MemberPointEntitle> memberPointEntitleList=this.memberService.getMemberPointEntitleList( agreement.getAgreementId(),pointCatId);
//			
//			/*if(memberPointEntitleList.size()==0)
//				throw new BaseException(SpringUtils.getMessage("error.member.entitlement.not.found",new Object[]{}));*/	
//			if (memberPointEntitleList.size()>0){
//				MemberPointEntitle memberPointEntitle=null;
//				memberPointEntitle = memberPointEntitleList.get(0);
//				
//				//Update Member Point
//				memberPointEntitle.setPoint(memberPointEntitle.getPoint()+bookingPoint);
//				memberPointEntitle.setModifiedDate(new Date());
//				dao.update(memberPointEntitle);	
//			}
//		}catch(BaseException be){
//			throw be;
//		}catch(Exception ex){
//			
//		}
//	}
//	
//	private Integer getPeakPoints(MemberBooking booking,Integer calculatedPoint)throws BaseException{
//		Integer peakPoints=0;
//		
//		try{
//			CalendarDtl calendarDtl = this.partnerDao.getCalendarDtl(booking.getBookingPackage().getCalendarCat().getCalendarCatId(), booking.getCheckInDate());
//			if (calendarDtl!=null){
//				boolean superPeak=false;
//				if (calendarDtl.getSeason().equalsIgnoreCase(PartnerConstant.PARTNER_PRODUCT_SUPER_PEAK_SEASON))
//					superPeak = true;
//				
//				PackagePeakRates peakRates = null;
//				if (superPeak)
//					peakRates = this.packageDao.getPackagePeakRates(booking.getBookingPackage(), this.superPeakType, booking.getCheckInDate());
//				else
//					peakRates = this.packageDao.getPackagePeakRates(booking.getBookingPackage(), this.normalPeakType, booking.getCheckInDate());
//				
//				if (peakRates!=null){
//					peakPoints = peakRates.getPoint();
//				}
//					
//			}
//			if (peakPoints==0)
//				peakPoints =  calculatedPoint;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			
//		}
//		return peakPoints;
//	}
//	
//	private Double getPeakPrice(MemberBooking booking,Double nonPeakPrice)throws BaseException{
//		Double peakPrice=0.0;
//		
//		try{
//			CalendarDtl calendarDtl = this.partnerDao.getCalendarDtl(booking.getBookingPackage().getCalendarCat().getCalendarCatId(), booking.getCheckInDate());
//			if (calendarDtl!=null){
//				boolean superPeak=false;
//				if (calendarDtl.getSeason().equalsIgnoreCase(PartnerConstant.PARTNER_PRODUCT_SUPER_PEAK_SEASON))
//					superPeak = true;
//				
//				PackagePeakRates peakRates = null;
//				if (superPeak)
//					peakRates = this.packageDao.getPackagePeakRates(booking.getBookingPackage(), this.superPeakType, booking.getCheckInDate());
//				else
//					peakRates = this.packageDao.getPackagePeakRates(booking.getBookingPackage(), this.normalPeakType, booking.getCheckInDate());
//				
//				if (peakRates!=null){
//					peakPrice = peakRates.getPrice();
//				}
//					
//			}
//			if (peakPrice==0.0)
//				peakPrice =  nonPeakPrice;
//		}catch(Exception ex){
//			ex.printStackTrace();
//			
//		}
//		return peakPrice;
//	}
//	
//	public MemberBooking getMemberBooking(String memberBookingId)throws BaseException{
//		MemberBooking memberBooking = null;
//		
//		try{
//			memberBooking = (MemberBooking)dao.getObject(MemberBooking.class, memberBookingId);
//		}catch(Exception ex){
//			ex.printStackTrace();
//			throw new BaseException(SpringUtils.getMessage("error.invoke.method", new Object[]{"getMemberBooking()"}));
//		}
//		return memberBooking;
//	}
//}
